
#pragma once
#include <opencv2/opencv.hpp>

#pragma pack(push, 1)
typedef float4 Point;
typedef uchar4 RGB;
typedef uint16_t Depth;
typedef float3 Normal;
typedef float3 Vertex;
#define VOXELSIZE (0.01f)
struct Vovel
{
public:
    float tsdf;
    struct
    {
        uint8_t weight;
        uchar3 color;
    };
    // __kf_device__ Vovel() : tsdf(0.0f), weight(0) {}
    // __kf_device__ Vovel(float t, uint8_t w) : tsdf(t), weight(w) {}
};
struct Intr
{
    union
    {
        float4 cam;
        struct
        {
            float fx, fy, cx, cy;
        };
    };
    float sca;
    Intr(float4 intr)
    {
        cam = intr;
        sca = 0.001f;
    }
};
struct Camera;

#pragma pack(pop)

void raycast_test();

void raycast_add(cv::Mat &img,cv::Mat &nor,  cv::Affine3f pose, const void *pdata, float3 center, float4 cam);